
<#include "/common/head.html"/>


 <div class="easyui-panel updatePage" data-options="fit:true,border:false">
    <form id="ff" class="easyui-form" method="post">
        <table class="table1">
            <tr>
           		<th><span id="name_label">名称：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="name" id="name" value="${model.name!''}" data-options="fit: true,required:true"></input></div>
           		</td>
           		
            <tr>
           		<th><span id="target_type_label">任务类型：</span></th>
               	<td>
               		<div class="wrap_input"><input id="target_type" name="target_type" id="target_type" class="easyui-combobox" value="${model.target_type!''}" data-options="
               				required:true,
               				valueField: 'id',
        					textField: 'text',
        					fit: true,
        					data:[
        						{id:'', text:''}<#list dictDatatarget_type.keySet() as key>,{id:'${key}', text:'${dictDatatarget_type.get(key)}'}</#list>
	               			]
               		"/></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="target_value_label">任务值：</span></th>
               	<td>
           			<div class="wrap_input textarea"><textarea name="target_value" id="target_value" class="easyui-validatebox" data-options="required:true" rows="5" placeholder="多行用英文“;”隔开">${model.target_value!''}</textarea></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="cron_label">cron表达式：</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="cron" id="cron" value="${model.cron!''}" data-options="fit: true,required:true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span id="status_label">状态：</span></th>
               	<td>
               		<div class="wrap_input"><input id="status" name="status" id="status" class="easyui-combobox" value="${model.status!''}" data-options="
               				
               				valueField: 'id',
        					textField: 'text',
        					fit: true,
        					data:[
        						{id:'', text:''}<#list dictDatastatus.keySet() as key>,{id:'${key}', text:'${dictDatastatus.get(key)}'}</#list>
	               			]
               		"/></div>
           		</td>
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#zcurdHeadTable").form('validate')) {
		$.post("update", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	    	"id": ${model.id}, 
       	    "model.name": getInputValue("name"), 
       	    "model.target_type": getInputValue("target_type"), 
       	    "model.target_value": getInputValue("target_value"), 
       	    "model.cron": getInputValue("cron"), 
       	    "model.status": getInputValue("status")
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
